{% extends "visitor/base.html" %}

{% block title %}
{{ article.title }}
{% endblock title %}

{% block css %}
<script src='/js/highlight.pack.js'></script>
<script src="/js/arttemplate.js"></script>
<script src="/js/wangEditor.min.js"></script>
<script src="/js/index/index_command.js"></script>
<script src="/js/index/navigationBar.js"></script>
<link href='/css/monokai_default.css' rel='stylesheet'/>
<link href='/css/article_view.css' rel='stylesheet'/>
{% include "template/visitor_article_view.html" %}
{% endblock css %}

{% block header %}
<div class="img">
    <img src="/images/img_12.webp" class="img-responsive img-rounded" alt="藏川线前段"/><br>
    <p class="text-right">--- 摄于 2017 年 9 月 藏川线前段</p>
</div>
{% endblock header%}

{% block body %}
<div class="col-md-offset-1 col-md-10" data-id={{ article.id }}>
  {{ article.content | safe }}
</div>
<div class="col-sm-offset-1 col-sm-10 col-md-offset-1 col-md-10 col-xs-offset-1 col-xs-10 comment_ground">
    <h4>评论区</h4>
    <ul class="comment">

    </ul>

    <a id="load" style="display:block;cursor: pointer;"><p class="text-center">加载更多</p></a>
</div>

{% if user %}
<div class=" col-md-offset-1 col-md-10" style="margin-top: 20px;">
    <div id="editor">

    </div>

    <button class="btn btn-primary pull-right comment">评论</button>
</div>
{% else %}
<div class="col-md-offset-1 col-md-10" style="margin-top: 20px;">
    <p>请<a href="/home">登录</a>后评论</p>
</div>
{% endif %}
<div class="alert alert-danger float_alert"></div>
<div class="alert alert-success float_alert"></div>
{% endblock body %}

{% block script %}
{% if user %}
<script src="/js/article_view/wangeditor.js"></script>
{% endif %}
<script src="/js/article_view/article_view.js"></script>
{% endblock script%}
